home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / StandardFileIcons / The usual ReadMe < prev   
Encoding:
Text File  |  1994-09-23  |  2.8 KB  |  35 lines  |  [TEXT/ttxt]

  1.                         StandardFileIcons
  2.                                                           Brian Bechtel, DTS
  3.  
  4. A control panel example in three development environments
  5.  
  6. This control panel lets you control how the Standard File Package displays the icons it uses for files and folders.  Starting with System 7.5, PACK 3 has been enhanced to use the icons stored in the desktop database when displaying lists of files.  Before System 7.5 PACK 3 used a set of generic icons contained in the System file.
  7.  
  8. The new custom icons are groovy, but take time to retrieve, especially over low speed connections such as those provided by Apple Remote Access and modems.  This control panel lets you restore the original behavior of PACK 3; quick, generic icons.
  9.  
  10. Programmer information:
  11.  
  12. The control panel has various resources, a cdev resource containing the control panel code, and an INIT resource containing the startup code.  The INIT resource looks for a file in the Preferences folder of the current startup disk which has the name specified by 'STR ' ID 128.  If such a file exists, then we assume you want to use generic icons.
  13.  
  14. This entire control panel assumes the GestaltValue library available on the developer CD.  I've included the library from the August 1994 developer CD along with its header.  You may notice that SetGestaltValue is included in Gestalt.h starting on ETO 15.  I'm using the older library so that I'll work with System Update 3.0.
  15.  
  16. To build in Metrowerks:
  17. We assume that SFIcons.µ.rsrc exists.  Either use ToolServer to build it from the SFIcons.r resource file, or find another way to build it.  Build the SFIconInit.µ project first.   It merges the INIT code into SFIcons.µ.rsrc.  Build the SFIcons.µ project second.  It merges the resources in SFIcons.µ.rsrc with the code it compiles and builds the control panel.
  18.  
  19. To build in MPW:
  20. The command line
  21.   BuildProgram StandardFileIcons
  22. works fine for me.
  23.  
  24. To build in Symantec:
  25. Build the SFIconInit.π project first.  It will create the SFIcons.π.rsrc file.  Build the SFIcons.π project second.  It merges the resources in SFIcons.µ.rsrc with the code it compiles and builds the control panel.
  26.  
  27. All this stuff is Copyright © 1994 Apple Computer, Inc.  All rights reserved.
  28.  
  29. You may incorporate this sample code into your applications without restriction, though the sample code has been provided "AS IS" and the responsibility for its operation is 100% yours.  However, what you are not permitted to do is to redistribute the source as "DTS Sample Code" after having made changes. If you're going to re-distribute the source, we require that you make it clear in the source that the code was descended from Apple Sample Code, but that you've made changes.
  30.  
  31. Change History:
  32.  
  33. 1.1: Initial release outside a small circle of testers
  34. 1.2: Changed DisposeHandle on a resource to ReleaseResource instead. Thanks to Jon Pugh for noticing this.
  35.